/*
 Navicat Premium Data Transfer

 Source Server         : 本地SQL-Server
 Source Server Type    : SQL Server
 Source Server Version : 16001000 (16.00.1000)
 Source Host           : localhost:1433
 Source Catalog        : JDGL
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 16001000 (16.00.1000)
 File Encoding         : 65001

 Date: 10/06/2023 22:09:01
*/


-- ----------------------------
-- Table structure for AdminsT
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[AdminsT]') AND type IN ('U'))
	DROP TABLE [dbo].[AdminsT]
GO

CREATE TABLE [dbo].[AdminsT] (
  [AdminId] int  IDENTITY(10,1) NOT NULL,
  [Account] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Pwd] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL
)
GO

ALTER TABLE [dbo].[AdminsT] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of AdminsT
-- ----------------------------
SET IDENTITY_INSERT [dbo].[AdminsT] ON
GO

INSERT INTO [dbo].[AdminsT] ([AdminId], [Account], [Pwd]) VALUES (N'10', N'a', N'1')
GO

INSERT INTO [dbo].[AdminsT] ([AdminId], [Account], [Pwd]) VALUES (N'11', N'b', N'2')
GO

INSERT INTO [dbo].[AdminsT] ([AdminId], [Account], [Pwd]) VALUES (N'12', N'c', N'3')
GO

SET IDENTITY_INSERT [dbo].[AdminsT] OFF
GO


-- ----------------------------
-- Table structure for CommentsT
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[CommentsT]') AND type IN ('U'))
	DROP TABLE [dbo].[CommentsT]
GO

CREATE TABLE [dbo].[CommentsT] (
  [CommentId] int  IDENTITY(110,1) NOT NULL,
  [RoomNum] int  NULL,
  [Type] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [UserId] int  NULL,
  [Comment] nvarchar(max) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[CommentsT] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of CommentsT
-- ----------------------------
SET IDENTITY_INSERT [dbo].[CommentsT] ON
GO

SET IDENTITY_INSERT [dbo].[CommentsT] OFF
GO


-- ----------------------------
-- Table structure for FoodsT
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[FoodsT]') AND type IN ('U'))
	DROP TABLE [dbo].[FoodsT]
GO

CREATE TABLE [dbo].[FoodsT] (
  [FoodId] int  IDENTITY(123,1) NOT NULL,
  [Name] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [Price] decimal(18)  NULL
)
GO

ALTER TABLE [dbo].[FoodsT] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of FoodsT
-- ----------------------------
SET IDENTITY_INSERT [dbo].[FoodsT] ON
GO

INSERT INTO [dbo].[FoodsT] ([FoodId], [Name], [Price]) VALUES (N'123', N'爆炒辣子鸡', N'69')
GO

INSERT INTO [dbo].[FoodsT] ([FoodId], [Name], [Price]) VALUES (N'124', N'火山飘雪', N'79')
GO

INSERT INTO [dbo].[FoodsT] ([FoodId], [Name], [Price]) VALUES (N'125', N'龙之吐息', N'66')
GO

SET IDENTITY_INSERT [dbo].[FoodsT] OFF
GO


-- ----------------------------
-- Table structure for RoomsT
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[RoomsT]') AND type IN ('U'))
	DROP TABLE [dbo].[RoomsT]
GO

CREATE TABLE [dbo].[RoomsT] (
  [RoomNum] int  NOT NULL,
  [Floor] int  NULL,
  [Status] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [Type] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [UserId] int  NULL,
  [AdminId] int  NULL
)
GO

ALTER TABLE [dbo].[RoomsT] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of RoomsT
-- ----------------------------
INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'101', N'1', N'空闲', N'标准 (单人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'102', N'1', N'空闲', N'标准 (双人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'103', N'1', N'空闲', N'豪华套房', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'201', N'2', N'空闲', N'标准 (单人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'202', N'2', N'空闲', N'标准 (双人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'203', N'2', N'空闲', N'豪华套房', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'301', N'3', N'空闲', N'标准 (单人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'302', N'3', N'空闲', N'标准 (双人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'303', N'3', N'空闲', N'豪华套房', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'401', N'4', N'空闲', N'标准 (单人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'402', N'4', N'空闲', N'标准 (双人)间', NULL, NULL)
GO

INSERT INTO [dbo].[RoomsT] ([RoomNum], [Floor], [Status], [Type], [UserId], [AdminId]) VALUES (N'403', N'4', N'空闲', N'豪华套房', NULL, NULL)
GO


-- ----------------------------
-- Table structure for UsersT
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[UsersT]') AND type IN ('U'))
	DROP TABLE [dbo].[UsersT]
GO

CREATE TABLE [dbo].[UsersT] (
  [Userid] int  IDENTITY(200,1) NOT NULL,
  [Email] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Account] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Pwd] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Money] decimal(18)  NULL,
  [Grade] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [CarNum] nvarchar(16) COLLATE Chinese_PRC_CI_AS  NULL,
  [AdminId] int  NULL
)
GO

ALTER TABLE [dbo].[UsersT] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of UsersT
-- ----------------------------
SET IDENTITY_INSERT [dbo].[UsersT] ON
GO

INSERT INTO [dbo].[UsersT] ([Userid], [Email], [Account], [Pwd], [Money], [Grade], [CarNum], [AdminId]) VALUES (N'200', N'1791748725@qq.com', N'a1', N'1', N'9000', N'VIP9', NULL, N'10')
GO

INSERT INTO [dbo].[UsersT] ([Userid], [Email], [Account], [Pwd], [Money], [Grade], [CarNum], [AdminId]) VALUES (N'203', N'1791748724@qq.com', N'a2', N'2', N'8000', N'VIP8', NULL, N'10')
GO

SET IDENTITY_INSERT [dbo].[UsersT] OFF
GO


-- ----------------------------
-- Auto increment value for AdminsT
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[AdminsT]', RESEED, 12)
GO


-- ----------------------------
-- Primary Key structure for table AdminsT
-- ----------------------------
ALTER TABLE [dbo].[AdminsT] ADD CONSTRAINT [PK_Admins] PRIMARY KEY CLUSTERED ([AdminId])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for CommentsT
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[CommentsT]', RESEED, 110)
GO


-- ----------------------------
-- Primary Key structure for table CommentsT
-- ----------------------------
ALTER TABLE [dbo].[CommentsT] ADD CONSTRAINT [PK_CommentsT_1] PRIMARY KEY CLUSTERED ([CommentId])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for FoodsT
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[FoodsT]', RESEED, 125)
GO


-- ----------------------------
-- Primary Key structure for table FoodsT
-- ----------------------------
ALTER TABLE [dbo].[FoodsT] ADD CONSTRAINT [PK_FoodsT] PRIMARY KEY CLUSTERED ([FoodId])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table RoomsT
-- ----------------------------
ALTER TABLE [dbo].[RoomsT] ADD CONSTRAINT [PK_RoomInfoT] PRIMARY KEY CLUSTERED ([RoomNum])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for UsersT
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[UsersT]', RESEED, 207)
GO


-- ----------------------------
-- Primary Key structure for table UsersT
-- ----------------------------
ALTER TABLE [dbo].[UsersT] ADD CONSTRAINT [PK_UserTable] PRIMARY KEY CLUSTERED ([Userid])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

